<!DOCTYPE html>
<html>
<head>
 <include file="public:header" />
 <link rel="stylesheet" href="__PUBLIC__/css/user.css">
 <title>我的等级</title>
</head>

<body>
<div class="unavli noitem"  ><div class="txt noarrow">微信接收通知</div> 
  <div class="switch J_switch <eq name="userinfo.isremind" value="1">select</eq>" val="{$userinfo.isremind}"></div>
</div>


<include file="public:foot" />
</body>
<script>
$('.J_switch').off().on('click',function(e){
			var btn=$(this);
			var isremind="{$userinfo.isremind}";
			 if (btn.hasClass("select"))
			 {
			 isremind=0;
			 btn.removeClass('select');
			 btn.attr('val',0);
			 }else{
			 btn.addClass('select');
			 btn.attr('val',1);
			 isremind=1;
			 } 
			 console.log(isremind);
			 var save_url="{:U('set_remind_save')}";
			$.getJSON(save_url, {isremind:isremind}, function (result) {
				if (result.code == 1) {
				 toast(result.msg,1);
				} else  {
				toast('AJAX ERR',0);	 
				}
			});
			 
			 
});
	  

    
</script>
</html>